﻿<!DOCTYPE html>
<html lang="en">
<#include "../include/resource-head.ftl"/>
<#assign active='vaccineAdd'/>
<body>
<#include "../include/common-top.ftl"/>
<div class="main-container" id="main-container">
    <div class="main-container-inner">
    <#include "../include/common-menu.ftl"/>
        <div class="main-content">
            <div class="page-content">
                <div class="col-xs-12">
                    <div class="row-fluid">
                        <div class="widget-box">
                            <div class="widget-header widget-header-blue widget-header-flat">
                                <h4 class="lighter">
                                    <i class="icon-plus"></i>添加疫苗信息
                                </h4>
                            </div>
                            <div class="widget-body">
                                <div class="widget-main">
                                    <div class="step-content row-fluid position-relative">
                                        <form class="form-horizontal" action="/vaccine/save" method="post" onsubmit="return form_submit()">
                                            <div class="form-group has-info">
                                                <label class="col-xs-12 col-sm-3 control-label no-padding-right">名称</label>
                                                <div class="col-xs-12 col-sm-5">
                                                    <input type="text" class="width-100" name="name" required/>
                                                </div>
                                            </div>
                                            <div class="form-group has-info">
                                                <label class="col-xs-12 col-sm-3 control-label no-padding-right">产地</label>
                                                <div class="col-xs-12 col-sm-5">
                                                    <input type="text" class="width-100" name="origin" required/>
                                                </div>
                                            </div>

                                            <div class="form-group has-info">
                                                <label class="col-xs-12 col-sm-3 control-label no-padding-right">批编号</label>
                                                <div class="col-xs-12 col-sm-5">
                                                    <input type="text" class="width-100" name="number" required/>
                                                </div>
                                            </div>

                                            <div class="form-group has-info">
                                                <label class="col-xs-12 col-sm-3 control-label no-padding-right">生产时间</label>
                                                <div class="col-xs-12 col-sm-5">
                                                    <input type="text" class="width-100 form_datetime" name="producttime" readonly data-date-format="yyyy-mm-dd" required/>
                                                </div>
                                            </div>

                                            <div class="form-group has-info">
                                                <label class="col-xs-12 col-sm-3 control-label no-padding-right">有效日期</label>
                                                <div class="col-xs-12 col-sm-5">
                                                    <input type="text" class="width-100 form_datetime" name="validtime" readonly data-date-format="yyyy-mm-dd"/>
                                                </div>
                                            </div>

                                            <div class="form-group has-info">
                                                <label class="col-xs-12 col-sm-3 control-label no-padding-right">最小接种年龄</label>
                                                <div class="col-xs-12 col-sm-5">
                                                    <input type="text" class="width-100" name="agemin" id="spinner"/>
                                                </div>
                                            </div>

                                            <div class="form-group has-info">
                                                <label class="col-xs-12 col-sm-3 control-label no-padding-right ">最大接种年龄</label>
                                                <div class="col-xs-12 col-sm-5">
                                                    <input type="text" class="width-100 " name="agemax" id="spinner2"/>
                                                </div>
                                            </div>

                                            <div class="form-group has-info">
                                                <label class="col-xs-12 col-sm-3 control-label no-padding-right">最多接种次数</label>
                                                <div class="col-xs-12 col-sm-5">
                                                    <input type="text" class="width-100" name="countmax" id="spinner3"/>
                                                </div>
                                            </div>
                                            <hr/>
                                            <div class="row-fluid wizard-actions">
                                                <button class="btn" type="reset">重置</button>
                                                <button class="btn btn-success" type="submit">提交</button>
                                            </div>
                                        </form>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <!-- /.page-content -->
        </div>
        <!-- /.main-content -->
    </div>
    <!-- /.main-container -->
</body>
<#include "../include/resource-script.ftl"/>
<script type="text/javascript">
    $('#spinner2,#spinner3').ace_spinner({
        value: 1,
        min: 1,
        max: 100,
        step: 1,
        on_sides: true,
        icon_up: 'icon-plus smaller-75',
        icon_down: 'icon-minus smaller-75',
        btn_up_class: 'btn-success',
        btn_down_class: 'btn-danger'
    });
    new PCAS("province", "city", "county", "北京市", "市辖区", "东城区");
    function form_submit(){
        var producttime = $('input[name="producttime"]').val();
        if(producttime.length == 0){
            tipMsg("请输入生产时间");
            return false;
        }
        var validtime = $('input[name="validtime"]').val();
        if(validtime.length == 0){
            tipMsg("请输入有效时间");
            return false;
        }
        return true;
    }

</script>
</html>

